@(game : at.ac.tuwien.big.we14.lab2.api.QuizGame , name : String)
@import play.i18n._
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Business Informatics Group Quiz - Zwischenstand</title>
        <link rel="stylesheet" type="text/css" href="@routes.Assets.at("/stylesheets/main.css")" />
        <script src="@routes.Assets.at("/javascripts/jquery-1.9.0.min.js")" type="text/javascript"></script>
        <script src="@routes.Assets.at("framework.js")" type="text/javascript"></script>
    </head>
    <body id="winnerpage">
        <a class="accessibility" href="#roundwinner">Zur Rundenwertung springen</a>
        <header role="banner" aria-labelledby="mainheading"><h1 id="mainheading"><span class="accessibility">Business Informatics Group</span> Quiz</h1></header>
        <nav role="navigation" aria-labelledby="navheading">
            <h2 id="navheading" class="accessibility">@Messages.get("navigation")</h2>
            <ul>
                <li><a id="logoutlink" title="Klicke hier um dich abzumelden" href="#" accesskey="l">@Messages.get("logout")</a></li>
            </ul>
        </nav>
        
        <section role="main">
            <!-- winner message -->
            <section id="roundwinner" aria-labelledby="roundwinnerheading">
                <h2 id="roundwinnerheading" class="accessibility">@Messages.get("roundover.roundstats")</h2>
                <p class="roundwinnermessage">@if(game.getCurrentRound().getRoundWinner()==null) {
                									Unendschieden
                								}else{
                									@game.getCurrentRound().getRoundWinner().getName() @Messages.get("roundover.winsround") @game.getCurrentRoundCount()!
                								}</p>
            </section>
        
            <!-- round info -->    
            <section id="roundinfo" aria-labelledby="roundinfoheading">
                <h2 id="roundinfoheading" class="accessibility">@Messages.get("quizover.playerinfo")</h2>
                <div id="player1info" class="playerinfo">
                    <span id="player1name" class="playername">@name</span>
                    <ul class="playerroundsummary">
                        @for(i <- 0 until 3) {
                    		@if(game.getCurrentRound().getAnswer(i, game.getPlayers().get(0))==null) {
                    			<li><span class="accessibility">Frage @i:</span><span id="player1answer@i" class="unknown">@Messages.get("roundover.unkonwn")</span></li>	
                    		}else{
                    			@if(game.getCurrentRound().getAnswer(i, game.getPlayers().get(0)).isCorrect()) {
		                     		<li><span class="accessibility">Frage @i:</span><span id="player1answer@i" class="correct">@Messages.get("roundover.correct")</span></li>                    			
                    			}else {
                    				<li><span class="accessibility">Frage @i:</span><span id="player1answer@i" class="incorrect">@Messages.get("roundover.wrong")</span></li>		
                    			}
                    		}
                    	}
                    </ul>
                    <p id="player1roundcounter" class="playerroundcounter">Gewonnene Runden: <span id="player1wonrounds" class="playerwonrounds">@game.getWonRounds(game.getPlayers().get(0))</span></p>
                </div>
                <div id="player2info" class="playerinfo">
                    <span id="player2name" class="playername">@game.getPlayers().get(1).getName()</span>
                    <ul class="playerroundsummary">
                         @for(i <- 0 until 3) {
                    		@if(game.getCurrentRound().getAnswer(i, game.getPlayers().get(1))==null) {
                    			<li><span class="accessibility">Frage @i:</span><span id="player1answer@i" class="unknown">@Messages.get("roundover.unkonwn")</span></li>	
                    		}else{
                    			@if(game.getCurrentRound().getAnswer(i, game.getPlayers().get(1)).isCorrect()) {
		                     		<li><span class="accessibility">Frage @i:</span><span id="player1answer@i" class="correct">@Messages.get("roundover.correct")</span></li>                    			
                    			}else {
                    				<li><span class="accessibility">Frage @i:</span><span id="player1answer@i" class="incorrect">@Messages.get("roundover.wrong")</span></li>		
                    			}
                    		}
                    	}
                    </ul>
                    <p id="player2roundcounter" class="playerroundcounter">Gewonnene Runden: <span id="player2wonrounds" class="playerwonrounds">@game.getWonRounds(game.getPlayers().get(1))</span></p>
                </div>
                @helper.form(action = routes.BigQuiz.doGame()) {
          			<INPUT type="submit" id="next" value="Weiter" accesskey="n"/>
          			<INPUT type="hidden" name="seen" value="seen"  />
          		}
                <!-- >a id="next" href="question.html">Weiter</a-->
            </section>
        </section>

        <!-- footer -->
        <footer role="contentinfo">© 2014 BIG Quiz</footer>
    </body>
</html>
